home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Internet Tools 1993 July / Internet Tools.iso / RockRidge / security / tcpr-1.1.5 / HOW-IT-WORKS < prev    next >
Encoding:
Text File  |  1993-03-02  |  2.7 KB  |  69 lines

  1. #
  2. # File:        HOW-IT-WORKS
  3. # Author:    G. Paul Ziemba <paul@alantec.com>
  4. # SCCS:        @(#)HOW-IT-WORKS    1.1 3/2/93
  5. # Purpose:    principles of operation
  6. #
  7.  
  8.  
  9.     Tcpr is designed to allow clients on an internal network telnet
  10. and ftp through an existing "firewall" host (i.e., a host that has
  11. IP forwarding disabled) to the outside world. There are three
  12. programs in this package; please refer to the picture below.
  13.  
  14.  
  15.  
  16.     +-----------+        +---------------+
  17.     |  client    |        |   firewall    |
  18.     |   host    |        |     host    |
  19.     +-----------+        +---------------+
  20.     |        |        |        |
  21.     |  pclient    |-------------->|   tcprpmd    |
  22.     |          |        |        |
  23.     |        |        |   tcprelay    |
  24.     +-----------+        +---------------+
  25.                     |
  26.                     |
  27.                     +-------> To remote host on
  28.                            outside network
  29.  
  30.     The pclient program gets linked to the names "pftp" and "ptelnet".
  31. The name it is called with determines the type of service it requests,
  32. and also which program (telnet or ftp) gets called after the connection
  33. gets set up.
  34.  
  35.     When pclient is invoked, it connects to the tcprpmd server on the
  36. firewall. It then passes information about the desired remote server
  37. (specifically, server address and port number) to tcprpmd.
  38.  
  39.     Tcprpmd then calls tcprelay to actually set up the proxy connection.
  40. Tcprelay connects to the remote host using the address and port number
  41. given via tcprpmd. After the connection is successful, it listens on
  42. a port on the firewall host. It tells tcprpmd what port number it is
  43. listening on.
  44.  
  45.     Tcprpmd relays the firewall port number back to pclient; pclient
  46. then invokes telnet or ftp _to the firewall_ on the port number it
  47. obtained from tcprpmd.
  48.  
  49.     After tcprelay has accepted the connection from the client telnet/ftp,
  50. it simply copies data in both directions between the client and the
  51. remote host. When it gets an EOF on one of the streams, it exits.
  52.  
  53.     Special handling is implemented to deal with ftp data connections.
  54. In normal operation, when the client ftp requests a transfer, it first
  55. sends a PORT command to the server on their control connection (the
  56. control connection is the connection that we set up above). The port
  57. command has parameters that describe the IP address and TCP port number
  58. on which the client is listening, in expectation that the server will
  59. set up a new stream connection to the client to transfer data.
  60.  
  61.     The tcprelay program scans the control stream from the client
  62. as it copies it to the remote server. If it sees a PORT command,
  63. it interposes itself by setting up an additional pair of connections
  64. for the data. It uses the paramaters from the PORT command to connect
  65. to the ftp client, does a listen on a new port, and then generates a new
  66. PORT command (with it's own parameters) to send to the remote server.
  67. It forwards in both directions on the data connection until EOF.
  68.  
  69.